﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Buccontrols;

namespace BuccViewer
{
    public partial class BuccViewer : PluginForm
    {
        public BuccViewer()
        {
            InitializeComponent();
        }

        public void LoadImageFile(string filename)
        {
            this.pbx_picture.BackgroundImage = new Bitmap(filename);
            if (this.pbx_picture.BackgroundImage.Size.Width < this.Width && this.pbx_picture.BackgroundImage.Size.Height < this.Height)
                this.BackgroundImageLayout = ImageLayout.Center;
            else
                this.BackgroundImageLayout = ImageLayout.Zoom;
        }

        public void LoadImage(Image image)
        {
            this.pbx_picture.BackgroundImage = image;
        }
    }
}
